package com.liveneo.adapter.mobile.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.liveneo.adapter.base.entity.PrpmProvince;
import com.liveneo.adapter.base.mapper.PrpmProvinceMapper;
import com.liveneo.adapter.mobile.service.ProvinceService;

@Service
public class ProvinceServiceImpl implements ProvinceService {
    @Autowired
    private PrpmProvinceMapper provinceMapper;

    @Override
    public List<PrpmProvince> selectProvinceByPid(int pid) {
        return provinceMapper.selectProvinceByPid(pid);
    }

    @Override
    public List<PrpmProvince> selectInfoByFlagAndPid0(String flag) {
        return provinceMapper.selectInfoByFlagAndPid0(flag);
    }

    @Override
    public List<PrpmProvince> selectCodeByTitle(String title) {
        return provinceMapper.selectCodeByTitle(title);
    }

    @Override
    public List<PrpmProvince> selectCodeByPremDriverTitle(String title) {
        return provinceMapper.selectCodeByPremDriverTitle(title);
    }

    @Override
    public List<PrpmProvince> selectProvinceByProvinceId(Integer provinceId) {
        return provinceMapper.selectProvinceByProvinceId(provinceId);
    }

    @Override
    public PrpmProvince selectByTitle(String title) {
        return provinceMapper.selectByTitle(title);
    }

    @Override
    public List<PrpmProvince> selectByTitleAndPid(Integer pid, String city) {
        Map<String, Object> map = new HashMap<String, Object>();
        map.put("pid", pid);
        map.put("title", city);
        return provinceMapper.selectByTitleAndPid(map);
    }
}
